1. Field of the Invention
The present invention relates to a method and apparatus for designing a sound compensation filter of a portable terminal. More particularly, the present invention relates to a method and an apparatus for designing a sound compensation filter of a portable terminal by recovering loss of a sound signal.
2. Description of the Related Art
Recently, advances in the electronics and communication industries have lead to the wide spread use of portable terminals. To meet user's evolving demands, portable terminals are advancing from the simple function of mobile communication to provide various additional functions. Also, portable terminals are being made smaller and lighter.
When a portable terminal is made smaller and lighter, a resonance space of the portable terminal becomes quite narrow. Accordingly, a small-scale loudspeaker is provided. Hence, sound characteristics of the portable terminal exhibit a frequency response having a variation range of about ±20 dB within an operating frequency. Such variation causes the sound characteristics of the portable terminal to be worse than a general audio system. However, the poor sound characteristics can be greatly improved by embedding a compensation filter in the portable terminal.
FIG. 1 is a block diagram of a sound compensation filter designed for a conventional portable terminal.
Referring to FIG. 1, a test signal generated at a computer is converted through a D/A codec 101 of a computer measurement device, amplified through a power amplifier 103, and applied to the portable terminal. The signal reproduced through a speaker 105 of the portable terminal is input to a microphone 107 of the measurement device and stored in the computer via a microphone amplifier 109 and an A/D codec 111. The computer extracts an impulse response signal 115 from the stored signal using a reverse test signal and calculates a frequency response 117 using the extracted impulse response signal. Using the calculated frequency response signal, a compensation filter 119 is designed.
More specifically, the characteristics of the frequency response vary in range by about ±20 dB within the operating frequency. That is, the frequency response includes a plurality of peaks and dips, which degrade the sound quality (or the sound). To compensate for the peaks and the dips, the computer drops the peaks and raises the dips. Thus, the compensation filter 119 is designed by obtaining the inverse frequency response.
The designed compensation filter 119 is stored in a memory of the portable terminal and applied in real time every time a user replays music using the portable terminal. In a conventional portable terminal of FIG. 2, after passing through a decoder (not shown), the sound source is compensated in real time at the compensation filter 220, converted to an analog signal through a D/A codec 202, amplified through a power amplifier 204, and then output through a speaker 206.
As discussed above and illustrated in FIGS. 1 and 2, it is primarily the computer that implements the filter to compensate for the sound. Accordingly, if the computer suffers from a resource problem, a signal loss may result. Also, a signal loss may result from a data drop in communications between devices. Since the signal loss is very small in comparison with the total waveform, it is difficult to determine the signal loss merely using the recording waveform of FIG. 3. However, the presence or absence of the signal loss can be determined by thoroughly examining the detailed waveform as shown in FIG. 4. Unfortunately, this method is disadvantageous because it takes quite a long time. Yet the determination of a signal loss is important because, even with a small signal loss, the calculated frequency response characteristics vary significantly as shown in FIG. 5 if a signal loss has occurred. Thus, it is difficult to compensate for a waveform that includes a signal loss when designing a compensation filter.